package com.yanqu.road.entity.activity.hsisland.data;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@FieldTypeAnnotation(tableName = "t_c_activity_hs_island_activity_data")
public class HsIslandActivityData extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "分组ID", select = true, update = true)
    private int groupId;

    @FieldTypeAnnotation(desc = "全服战意值")
    private long battleValue;

    @FieldTypeAnnotation(desc = "全服战意值上限")
    private long maxBattleValue;

    @FieldTypeAnnotation(desc = "生成boss数量")
    private int bossNum;

    @FieldTypeAnnotation(desc = "当前世界boss信息")
    private HsIslandMonsterData bossData = null;

    @FieldTypeAnnotation(desc = "上次增加战意的时间")
    private long lastBattleValueTime;

    @FieldTypeAnnotation(desc = "活动结束通知区服更新商会成就时间")
    private long updateUnionAcTime;

    @FieldTypeAnnotation(desc = "补发奖励标识")
    private boolean sendReward;

    public HsIslandActivityData() {
    }

    public HsIslandActivityData(int activityId, int groupId) {
        this.activityId = activityId;
        this.groupId = groupId;
        this.battleValue = 0;
        this.maxBattleValue = 0;
        this.bossNum = 0;
        this.bossData = null;
        this.lastBattleValueTime = 0;
        this.updateUnionAcTime = 0;
        this.sendReward = false;
        this.setInsertOption();
    }

    public int getActivityId() {
        return activityId;
    }
    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public int getGroupId() {
        return groupId;
    }
    public void setGroupId(int groupId) {
        if (this.groupId != groupId) {
            this.groupId = groupId;
            setOp(DataStatus.Update);
        }
    }

    public long getBattleValue() {
        return battleValue;
    }
    public void setBattleValue(long battleValue) {
        if (this.battleValue != battleValue) {
            this.battleValue = battleValue;
            setOp(DataStatus.Update);
        }
    }

    public long getMaxBattleValue() {
        return maxBattleValue;
    }
    public void setMaxBattleValue(long maxBattleValue) {
        if (this.maxBattleValue != maxBattleValue) {
            this.maxBattleValue = maxBattleValue;
            setOp(DataStatus.Update);
        }
    }

    public int getBossNum() {
        return bossNum;
    }
    public void setBossNum(int bossNum) {
        if (this.bossNum != bossNum) {
            this.bossNum = bossNum;
            setOp(DataStatus.Update);
        }
    }

    public HsIslandMonsterData getBossData() {
        return bossData;
    }
    public void setBossData(HsIslandMonsterData bossData) {
        if (null == bossData){
            return;
        }
        if (this.bossData == null || !this.bossData.equals(bossData)) {
            this.bossData = bossData;
            setOp(DataStatus.Update);
        }
    }

    public long getLastBattleValueTime() {
        return lastBattleValueTime;
    }
    public void setLastBattleValueTime(long lastBattleValueTime) {
        if (this.lastBattleValueTime != lastBattleValueTime) {
            this.lastBattleValueTime = lastBattleValueTime;
            setOp(DataStatus.Update);
        }
    }

    public long getUpdateUnionAcTime() {
        return updateUnionAcTime;
    }
    public void setUpdateUnionAcTime(long updateUnionAcTime) {
        if (this.updateUnionAcTime != updateUnionAcTime) {
            this.updateUnionAcTime = updateUnionAcTime;
            setOp(DataStatus.Update);
        }
    }

    public boolean isSendReward() {
        return sendReward;
    }

    public void setSendReward(boolean sendReward) {
        if (this.sendReward != sendReward) {
            this.sendReward = sendReward;
            setOp(DataStatus.Update);
        }
    }
}
